﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Content.aspx.cs" Inherits="Web.Content" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>内容主页面</title>
    <script type="text/javascript">
        //if (top.window != window) window.top.location.href = '/EOAU/Default2.aspx';
    </script>

    <script src="Javascript/jquery-1.4.4.min.js" type="text/javascript"></script>
    <link href="App_Themes/NewPage/Styles/layout.css" rel="stylesheet" type="text/css" />
    <link href="App_Themes/NewPage/Styles/leftmenu_new.css" rel="stylesheet" type="text/css" />

    
    <style type="text/css">
        body,html{ margin:0; padding:0; overflow:hidden; }
    </style>
    <script type="text/javascript">

        var RF = {
            wh: {},
            iniSize: function() {
                var _win = $(window);
                this.wh.w = _win.width();
                this.wh.h = _win.height();
                this.wh.split_w = $('#spliter').width();

                $('.PGH').css('height', this.wh.h - $('#footer').height());
                $('#rightRoot').width(this.wh.w - this.wh.split_w - $('#leftRoot').width());

            },
            ini: function() {
            this.iniSize();
                $('#leftRoot_list .l1').click(function() {
                    var _c = $(this), _s = _c.next().css('display'); _c.parent().find('.l0').hide(); _c.parent().find('.l1 a').removeClass('active');
                    if (_s == 'none') { _c.find('a').addClass('active'); _c.next().show(); }
                });

                /*分隔符*/
                $('#spliter a').click(function() {
                    var data = $(this).data('SPW'), lm = $('#leftRoot'), t = 0;
                    if (!data) data = { ow: 0, cw: $('#leftRoot').width() };

                    if (data.cw <= 0) { t = data.ow; lm.width(data.ow); data.ow = data.cw; data.cw = t; }
                    else { lm.width(0); data.ow = data.cw; data.cw = 0; }

                    $('#rightRoot').width(RF.wh.w - RF.wh.split_w - data.cw);
                    $(this).data('SPW', data);
                });

                $('#rightRoot').html('<iframe id="main" src="mainPage.aspx" style="width:100%; height:100%; overflow-x:hidden; overflow-y:outo; border:none;background:white;" frameborder="0" scrolling="yes" noresize="noresize" marginheight="0" marginwidth="0" ></iframe>')
                $('#leftRoot_list .url').click(function() {
                    $('#main').attr('src', $(this).attr('href'));
                    return false;
                });
            }
        }

        $(function() {
            RF.ini();
            $(window).resize(function() { RF.iniSize(); });
            iniget();
            window.setInterval(iniget, 300000);

        });

        function iniget() {
            getworktodo();
            getshortmessagecount();
            getdealingwork();
            getmailscount();
        }
        
        function getworktodo() {
            $.ajax({
                type: "POST",
                async: "true",
                contentType: "application/json",
                url: "Views/WorkAssistant/CommissionService.asmx/GetCommissionDataCount",
                data: '{"userid":"' + $('#currentuseid').val() + '"}',
                dataType: "json",
                success: function(result) {
                    $("#workstodo").html("(" + result.d + ")");
                },
                error: function(result, status) {
                    if (status == 'error') {
                        //$("#workstodo").html("(0)");
                    }
                }
            })
        }

        function getshortmessagecount() {
            $.ajax({
                type: "POST",
                async: "true",
                contentType: "application/json",
                url: "Views/WorkAssistant/CommissionService.asmx/GetShortMessageCount",
                data: '{"userid":"' + $('#currentuseid').val() + '"}',
                dataType: "json",
                success: function(result) {
                    $("#shortmessagecount").html("(" + result.d + ")");
                },
                error: function(result, status) {
                    if (status == 'error') {
                        //$("#shortmessagecount").html("(0)");
                    }
                }
            })
        }
        function getdealingwork() {
            $.ajax({
                type:"POST",
                async:"true",
                contentType: "application/json",
                url: "Views/WorkAssistant/CommissionService.asmx/GetDealingWorkflowCount",
                data: '{"userid":"' + $('#currentuseid').val() + '"}',
                dataType: "json",
                success: function(result) {
                    $("#dealingworktodo").html("(" + result.d + ")");
                },
                error: function(result, status) {
                    if (status == 'error') {
                        //$("#dealingworktodo").html("(0)");
                    }
                }
            })
        }

        function getmailscount() {
            $.ajax({
                type: "POST",
                async: "true",
                contentType: "application/json",
                url: "Views/WorkAssistant/CommissionService.asmx/GetMailCount",
                data: '{"userid":"' + $('#currentuseid').val() + '","passwd":"' + $("#currentpasswd").val() + '"}',
                dataType: "json",
                success: function(result) {
                    $("#mailscount").html("(" + result.d + ")");
                },
                error: function(result, status) {
                    if (status == 'error') {
                        //$("#mailscount").html("(0)");
                    }
                }
            })
        }
    </script>
</head>
<body>
    <div id="leftRoot" class="PGH">
    <div id="leftRoot_top"></div>
    <div id="leftRoot_list">
        <ul>
            <li class="l1"><a href="javascript:void(0)"><span><img alt="" class="icons" src="App_Themes/NewPage/icons/leftnav_daiban.png" />单井管理</span></a></li>
            <li class="l0" style=" display:block;">
                <ul class="MenuItem">
                    <li class="l22" id="lSingleWell" runat="server"><a id="aSingleWell" runat="server" href="Views/SingleWellManage/SingleWellSearch.aspx" class="url"><span>单井查询</span> <img alt="" class="icons2" src="App_Themes/NewPage/icons/leftnav_jishixiaoxi.png" /><span class="white" id="shortmessagecount"></span></a></li>
                </ul>
            </li>
            <li class="l1"><a href="javascript:void(0)"><span><img alt="" class="icons" src="App_Themes/NewPage/icons/leftnav_guizhangzhidu.png" />档案管理</span></a></li>
            <li class="l0">
                <ul class="MenuItem">
                    <li class="l22" id="lArchiveSearch" runat="server"><a id="aArchiveSearch" runat="server" href="Views/ArchiveFlowView/ArchiveSearch.aspx" class="url"><span>档案查询</span></a></li>
                </ul>
            </li>
        </ul>
    </div>
</div>

<div class="PGH" id="spliter"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"><tr><td><a href="javascript:void(0)"></a></td></tr></table></div>
<div class="PGH" id="rightRoot"></div>

<div id="footer"> <span class="copy">Copyright © 2012 大庆档案服务综合管理平台 All Rights Reserved.</span>
  <ul>
    <%--<li>当前在线人数：<label id="Num"><%=OnlineUserCount %></label>人</li>--%>
    <li></li>
  </ul>
</div>
<input type="hidden" runat="server" id="currentuseid" value="" />
<input type="hidden" runat="server" id="currentpasswd" value="" />
</body>
</html>
